package com.marvels.system.permission.service;

import java.util.List;

import com.github.pagehelper.Page;
import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.system.permission.dto.SysRoleDTO;
import com.marvels.system.permission.dto.SysUserDTO;
import com.marvels.system.permission.dto.SysUserParamDTO;

/**
 * 
* @ClassName: SysUserService 
* @Description:  用户服务
* @author 李瑶
* @date 2018年1月22日 下午4:18:35 
*
 */

public interface SysUserService {
	/**
     * 分页查询
     * @param pageNo 页号
     * @param pageSize 每页显示记录数
     * @return
     */
    public Page<SysUserDTO> getUserPageByOrgCode(SysUserDTO conditions,Integer pageNo,Integer pageSize)throws MarvelsBusinessException;
    
    /**
     * 新增用户
     * @param user
     * @return
     * @throws MarvelsBusinessException
     */
    public int addUser(SysUserDTO user)throws MarvelsBusinessException;
    
    /**
     * 获取用户详情
     * @param user
     * @return
     * @throws MarvelsBusinessException
     */
    public SysUserDTO getUserById(SysUserDTO user)throws MarvelsBusinessException;
    
    /**获取用户详情
     * @param user
     * @return
     * @throws MarvelsBusinessException
     */
    public SysUserDTO getUserByUserCode(String userCode)throws MarvelsBusinessException;
    /**
     * 更新用户
     * @param user
     * @return
     * @throws MarvelsBusinessException
     */
    public int updateUser(SysUserDTO user)throws MarvelsBusinessException;
    
    /**
     * 删除用户
     * @param user
     * @return
     * @throws MarvelsBusinessException
     */
    public int deleteUser(SysUserDTO user)throws MarvelsBusinessException;

    
    /**
     * 获取所有用户
     * @return
     * @throws MarvelsBusinessException
     */
    public Page<SysUserDTO> selectUserList()throws MarvelsBusinessException; 
    
    
    public List<SysUserDTO> querySysUsers(SysUserParamDTO sysUserParamDTO)throws MarvelsBusinessException; 
    
    /**
     * 获取所有面签角色数量
     * @return
     * @throws MarvelsBusinessException
     */
    
    public Integer selectFacesigRoleNumber()throws MarvelsBusinessException;
    
    /**通过角色查询用户
     * @author 何杰
     * 2018年5月20日
     * @param roleCode
     * @return
     */
    public List<SysUserDTO> selectUserByRoleCode(String roleCode)throws MarvelsBusinessException;
    
    /**
     * 查询所有用户
     * @param ignoreUserCode 需要忽略的userCode
     * @return
     * @throws MarvelsBusinessException
     */
    public List<SysUserDTO> selectUserListIgnore(List<String> ignoreUserCodeList)throws MarvelsBusinessException;
}
